package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacManagerDao;
import com.woniuxy.exception.MyException;
import com.woniuxy.service.RbacManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class RbacManagerServiceImpl implements RbacManagerService {
//    <bean class="RbacManagerServiceImpl" autowire="byType">

    RbacManagerDao rbacManagerDao;
    @Autowired
    public void setRbacManagerDao(RbacManagerDao rbacManagerDao) {
        this.rbacManagerDao = rbacManagerDao;
    }

    @Override
    public Map<String, Object> findOne(int id) {
            int i = 1 / 0;
        return rbacManagerDao.findOne(id);
    }

    @Override
    public List<Map<String, Object>> findAll() {
        return rbacManagerDao.findAll();
    }

    @Override
    public Integer save(Map<String, String> manager) {
        return rbacManagerDao.save(manager);
    }
}
